package com.cloud.tsp.controller;

import com.cloud.core.util.R;
import com.cloud.api.domain.stats.QueryRecord;
import com.cloud.api.domain.tsp.VehicleLogout;
import com.cloud.api.validgroup.ValidateGroupUpdate;
import com.cloud.log.annotation.Log;
import com.cloud.log.enums.BusinessType;
import com.cloud.log.enums.OperatorType;
import com.cloud.tsp.service.IVehicleLogoutService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;
import jakarta.validation.Valid;

/**
 * <p>
 * OLAP 前端控制器
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-01
 */
@RestController
@RequestMapping("/vehicle-logout")
public class VehicleLogoutController {

    @Resource
    private IVehicleLogoutService vehicleLogoutService;


    @Tag(name = "v1.0")
    @Operation(summary = "查询登出报文详情(管理)")
    @PostMapping("/getLogoutRecordDetail")
    @Log(title = "报文管理-查询登出报文详情", businessType = BusinessType.OTHER, operatorType = OperatorType.MANAGE)
    public R<VehicleLogout> selectLogoutRecordDetail(@Validated(ValidateGroupUpdate.class) @RequestBody @Valid QueryRecord para){
        return R.ok(vehicleLogoutService.selectLogoutRecordDetail(para));
    }
}